//
// Created by masaikk on 2020/12/21.
//

#ifndef COLK_SOLUTION_H
#define COLK_SOLUTION_H

#include <vector>
using namespace std;
class Solution {
public:
    int minCostClimbingStairs(vector<int>& cost) {
        cost.push_back(0);
        for (int i=2;i<cost.size();++i) {
            cost[i] = min(cost[i-1],cost[i-2]) + cost[i];
        }
        return cost.back();
    }
};


#endif //COLK_SOLUTION_H
